/********************************************************************
  Copyright by PCI, 2002-10-08
  File Name: db_ppm_partner.cxx
  Created Date: 2002-10-08 
  Author: Machine
  Version: 1.0 
  Last Version Date: 
  Version Date:
*******************************************************************/
/********************************************************************
  Copyright by PCI, 2002-10-08
  Class Name: CTable_PPM_PARTNER
  Created Date: 2002-10-08 
  Author: Machine
  Defined File: db_ppm_partner.hxx
  Last Version Date: 
  Version Date:
*******************************************************************/
#include "table_ppm.h"

CTable_PPM_PARTNER::CTable_PPM_PARTNER( )
 :NPCRecordSet( )
{
  setTableName( "PPM_PARTNER" );
  prepareTable();
  prepareQuery();
 
  PARTNER_ID.setField( "PARTNER_ID", DATA_DOUBLE, 22, 1 );
  makeTableItem( PARTNER_ID );
  makeKeyItem( PARTNER_ID ); 
  PARTNER_CODE.setField( "PARTNER_CODE", DATA_CHAR, 30, 0 );
  makeTableItem( PARTNER_CODE );
  PARTNER_TYPE.setField( "PARTNER_TYPE", DATA_CHAR, 6, 0 );
  makeTableItem( PARTNER_TYPE );
  PARTNER_DESC.setField( "PARTNER_DESC", DATA_CHAR, 256, 0 );
  makeTableItem( PARTNER_DESC );
  STATE.setField( "STATE", DATA_CHAR, 3, 0 );
  makeTableItem( STATE );
  STATE_DATE.setField( "STATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( STATE_DATE );
  PARTNER_LEVEL.setField( "PARTNER_LEVEL", DATA_CHAR, 256, 0 );
  makeTableItem( PARTNER_LEVEL );
  PARTNER_NAME.setField( "PARTNER_NAME", DATA_CHAR, 256, 0 );
  makeTableItem( PARTNER_NAME );
  PARTNER_PASSWORD.setField( "PARTNER_PASSWORD", DATA_CHAR, 30, 0 );
  makeTableItem( PARTNER_PASSWORD );
  PARTNER_AREA_CODE.setField( "PARTNER_AREA_CODE", DATA_CHAR, 30, 0 );
  makeTableItem( PARTNER_AREA_CODE );
  PARTNER_AUTHORITY_CODE.setField( "PARTNER_AUTHORITY_CODE", DATA_CHAR, 30, 0 );
  makeTableItem( PARTNER_AUTHORITY_CODE );
  PARTNER_URL.setField( "PARTNER_URL", DATA_CHAR, 256, 0 );
  makeTableItem( PARTNER_URL );
  PARTNER_IP.setField( "PARTNER_IP", DATA_CHAR, 256, 0 );
  makeTableItem( PARTNER_IP );
  ORDER_URL.setField( "ORDER_URL", DATA_CHAR, 256, 0 );
  makeTableItem( ORDER_URL );
  CANCEL_ORDER_URL.setField( "CANCEL_ORDER_URL", DATA_CHAR, 256, 0 );
  makeTableItem( CANCEL_ORDER_URL );
  CREATE_DATE.setField( "CREATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( CREATE_DATE );
}


CTable_PPM_PARTNER::CTable_PPM_PARTNER( NPConnection& pcldb )
 :NPCRecordSet( pcldb )
{
  setTableName( "PPM_PARTNER" );
  prepareTable();
  prepareQuery();
 
  PARTNER_ID.setField( "PARTNER_ID", DATA_DOUBLE, 22, 1 );
  makeTableItem( PARTNER_ID );
  makeKeyItem( PARTNER_ID ); 
  PARTNER_CODE.setField( "PARTNER_CODE", DATA_CHAR, 30, 0 );
  makeTableItem( PARTNER_CODE );
  PARTNER_TYPE.setField( "PARTNER_TYPE", DATA_CHAR, 6, 0 );
  makeTableItem( PARTNER_TYPE );
  PARTNER_DESC.setField( "PARTNER_DESC", DATA_CHAR, 256, 0 );
  makeTableItem( PARTNER_DESC );
  STATE.setField( "STATE", DATA_CHAR, 3, 0 );
  makeTableItem( STATE );
  STATE_DATE.setField( "STATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( STATE_DATE );
  PARTNER_LEVEL.setField( "PARTNER_LEVEL", DATA_CHAR, 256, 0 );
  makeTableItem( PARTNER_LEVEL );
  PARTNER_NAME.setField( "PARTNER_NAME", DATA_CHAR, 256, 0 );
  makeTableItem( PARTNER_NAME );
  PARTNER_PASSWORD.setField( "PARTNER_PASSWORD", DATA_CHAR, 30, 0 );
  makeTableItem( PARTNER_PASSWORD );
  PARTNER_AREA_CODE.setField( "PARTNER_AREA_CODE", DATA_CHAR, 30, 0 );
  makeTableItem( PARTNER_AREA_CODE );
  PARTNER_AUTHORITY_CODE.setField( "PARTNER_AUTHORITY_CODE", DATA_CHAR, 30, 0 );
  makeTableItem( PARTNER_AUTHORITY_CODE );
  PARTNER_URL.setField( "PARTNER_URL", DATA_CHAR, 256, 0 );
  makeTableItem( PARTNER_URL );
  PARTNER_IP.setField( "PARTNER_IP", DATA_CHAR, 256, 0 );
  makeTableItem( PARTNER_IP );
  ORDER_URL.setField( "ORDER_URL", DATA_CHAR, 256, 0 );
  makeTableItem( ORDER_URL );
  CANCEL_ORDER_URL.setField( "CANCEL_ORDER_URL", DATA_CHAR, 256, 0 );
  makeTableItem( CANCEL_ORDER_URL );
  CREATE_DATE.setField( "CREATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( CREATE_DATE );
}

CTable_PPM_PARTNER::~CTable_PPM_PARTNER( )
{
    close();
}

